laravel without global scope

40

public function boot()
    {
        parent::boot();

        Route::bind('project', function($id) {
            return \App\Project::withoutGlobalScopes()->findOrFail($id);
        });
    }
protected static function boot()
    {
        parent::boot();
  
        static::addGlobalScope(new ArchiveScope);
    }

Comments

Submit
0 Comments